<style>
#distribTeritorije{
	width:450px;
}
#distribTeritorije label{
	display:block;
	float:left;
	padding-top:8px;
}
#distribTeritory_main{
	float:left;
	clear:both;
	margin:20px 0px 0px 0px;
}
#distribTeritory_main #newTeritory{
	background-image:url(gui/icons/new.gif);
	background-repeat:no-repeat;
	background-position:3px center;
	padding-left:14px;
}
#distribTeritorije table{
	width:100%;
	border-left:1px solid #aaa;
	border-top:1px solid #aaa;
}
#distribTeritorije table tr.head{
	background:#2577BA;
	color:#fff;
}
#distribTeritorije table tr{
	vertical-align:top;
	text-align:center;
}
#distribTeritorije table tr td{
	border-right:1px solid #aaa;
	border-bottom:1px solid #aaa;
	padding:3px 5px;
	text-align:left;
}
#distribTeritorije table tr td input[type=button]{
	width:20px;
	height:20px;
	background-position:center center;
	background-repeat:no-repeat;
	margin-right:0px;
}
#distribTeritorije table tr td input[type=button]:first-child{
	margin-left:0px;
}
#distribTeritorije table tr td input[type=button].editTeritory{background-image:url(gui/icons/edit.gif)}
#distribTeritorije table tr td input[type=button].delTeritory{background-image:url(gui/icons/delete.gif)}
</style>
<form class="area" method="post" action="javascript:void(0)" onsubmit="distribTeritorijeAdmin(this)" id="distribTeritorije">
	<h1>Teritorije distribucije</h1>
	<label for="datum">Datum:</label>
	<input type="text" name="datum" id="datum" value="{{$datum}}" />
	<input type="button" class="datePicker" onclick="displayDatePicker('datum',this)" />
	<input type="submit" value="prikaži" />
	
	<div id="distribTeritory_main">
	<input type="button" id="newTeritory" onclick="showNewTeritory('{{$datum}}')" value="nova teritorija" /><br clear="all" />
	{{$comment_start}}
	<table>
		<tr class="head">
			<td width="40%">naziv</td>
			<td width="45%">opis</td>
			<td width="15%">&nbsp;</td>
		</tr>
		{{%loop start id}}
		<tr id="{{$id}}_teritorija">
			<td>{{$name}}</td>
			<td>{{$desc}}</td>
			<td>
				<input type="button" class="editTeritory" onclick="editTeritorija(this)" />
				<input type="button" class="delTeritory" onclick="deleteTeritorija(this)" />
			</td>
		</tr>
		{{%loop end}}
	</table>
	{{$comment_end}}
	{{$message}}
	</div>
</form>